package com.itic.appbase.framework.type;

public enum WithDrawStatus {
    Apply("0","申请"),SUCCESS("1","成功"),Fail("2","失败");
    private String status;
    private String name;

    WithDrawStatus(String status, String name) {
        this.status = status;
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public String getName() {
        return name;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static WithDrawStatus getWithDrawStatus(String status){
        WithDrawStatus withDrawStatus = null;
        switch (status){
            case "0":
                withDrawStatus = WithDrawStatus.Apply;
                break;
            case "1":
                withDrawStatus = WithDrawStatus.SUCCESS;
                break;
            case "2":
                withDrawStatus = WithDrawStatus.Fail;
                break;
        }
        return withDrawStatus;
    }
}
